<script setup>
import { inject } from 'vue';

const MessageBoxService = inject('MessageBoxService');
const exceptionInfo = {
    date: '2022/11/07 16:23:00',
    message: '程序发生了错误',
    detail: `
        java.lang.RuntimeException: null
        at io.iec.edp.caf.commons.event.entity.MethodDelegate.invoke(MethodDelegate.java:58)
        at io.iec.edp.caf.commons.event.EventHandlerSet.fire(EventHandlerSet.java:89)
        at io.iec.edp.caf.commons.event.EventHandlerSet$SynchronizedEventHandlerSet.fire(EventHandlerSet.java:167)
        at io.iec.edp.caf.commons.event.EventManager.fire(EventManager.java:54)
        at com.inspur.edp.lcm.metadata.core.event.MetadataEventManager.fireMetadataSavedEvent(MetadataEventManager.java:71)
        at com.inspur.edp.lcm.metadata.core.event.MetadataEventBroker.fireMetadataSavedEvent(MetadataEventBroker.java:44)
        at com.inspur.edp.lcm.metadata.core.MetadataCoreManager.saveMetadata(MetadataCoreManager.java:187)
    `
};
function showError() {
    MessageBoxService.error(exceptionInfo.message, exceptionInfo.detail, exceptionInfo.date);
}
</script>
<template>
    <f-button style="margin: 5px" :type="'danger'" @click="showError"> 显示异常 </f-button>
</template>
